import { BrowserHistory } from "history"
import * as React from "react"
import { MicroAppContext } from "../context/MicroAppContext"

const useHistory = (): BrowserHistory => {
  const { history } = React.useContext(MicroAppContext)

  return history as BrowserHistory
}
export default useHistory